{% extends 'base.html' %}

{% block title %}任务信息{% endblock %}

{% block breadcrumb %}
  <li class="breadcrumb-item"><a href="{% url 'home' %}">主页</a></li>
  <li class="breadcrumb-item active">任务</li>
{% endblock %}

{% block content %}
  <form class="form-horizontal" role="form" method="post" novalidate>
    {% csrf_token %}
  <div class="form-group">
    <label class="col-sm-2 control-label">id:</label>
    <div class="col-sm-10">
      <input class="form-control" id="disabledInput" type="text" placeholder="{{ task.pk }}"  disabled>
    </div>
  <div class="form-group">
    <label class="col-sm-2 control-label">任务:</label>
    <div class="col-sm-10">
      <input class="form-control" id="disabledInput" type="text" placeholder="{{ task.name  }}"  disabled>
    </div>
  </div>
  <div class="form-group">
    <label class="col-sm-2 control-label">发布者:</label>
    <div class="col-sm-10">
      <input class="form-control" id="disabledInput" type="text" placeholder="{{ task.created_by.username }}"  disabled>
    </div>
  </div>
  <div class="form-group">
    <label class="col-sm-2 control-label">点数:</label>
    <div class="col-sm-10">
      <input class="form-control" id="disabledInput" type="text" placeholder="{{ task.point }}"  disabled>
    </div>
  </div>
  <div class="form-group">
    <label class="col-sm-2 control-label">细节:</label>
    <div class="col-sm-10">
      <input class="form-control" id="disabledInput" type="text" placeholder="{{ task.descrition }}"  disabled>
    </div>
  </div>
  <div class="form-group">
    <label class="col-sm-2 control-label">图片:</label>
    <div class="col-sm-10">
{% if task.picture %}
    <img src="{{ task.picture.url }}">
{% endif %}
    </div>
  </div>
    <button type="submit" class="btn btn-success">领取</button> 
<!--    <a href="{% url 'Tasks:get_task' task.pk %}">
    <button type="button" class="btn btn-success">领取</button>
    </a> -->
  </form>

{% endblock %}
